\hypertarget{class_assembler_m_i_p_s}{
\subsection{AssemblerMIPS Class Reference}
\label{class_assembler_m_i_p_s}\index{AssemblerMIPS@{AssemblerMIPS}}
}
Describes a \hyperlink{class_assembler_m_i_p_s}{AssemblerMIPS} for the PL lanaguage.  


{\tt \#include $<$AssemblerMIPS.h$>$}

\subsubsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\hyperlink{class_assembler_m_i_p_s_bee29b538acc2c25e6a04f3a26363731}{AssemblerMIPS} (istream \&\_\-in, ostream \&\_\-out)
\begin{CompactList}\small\item\em Constuctor. \item\end{CompactList}\item 
\hypertarget{class_assembler_m_i_p_s_05ee2d3e1cd955267adf0859b0b3f666}{
void \hyperlink{class_assembler_m_i_p_s_05ee2d3e1cd955267adf0859b0b3f666}{firstPass} ()}
\label{class_assembler_m_i_p_s_05ee2d3e1cd955267adf0859b0b3f666}

\begin{CompactList}\small\item\em \hyperlink{class_first}{First} Pass The first pass creates a look up table for the variable sizes. \item\end{CompactList}\item 
void \hyperlink{class_assembler_m_i_p_s_94b9509fd13e8051f40e591327cc0d13}{secondPass} ()
\begin{CompactList}\small\item\em Second Pass Outputs the MIPS code. \item\end{CompactList}\end{CompactItemize}


\subsubsection{Detailed Description}
Describes a \hyperlink{class_assembler_m_i_p_s}{AssemblerMIPS} for the PL lanaguage. 

Notes: -MIPS use a stack the grows down, that means to add to the stack you need decreament the address. -There was no need to keep track of address labels, since MIPS supports labels. -In the manual it stated that the minium stack frame is 8 words (32). The PL implementation only uses 3 words, thus there is 5 words of wasted space. It should be possible to use this left over space for local variables. This would require some extra code to remember how much of the extra space was been used and if we need to start allocating new space on the stack for more local variables. -Other optimization that can be done, remove reduntant code or useless code. Such as not outputing the code in VARAIABLE to find the base pointer if level is 0. 

\subsubsection{Constructor \& Destructor Documentation}
\hypertarget{class_assembler_m_i_p_s_bee29b538acc2c25e6a04f3a26363731}{
\index{AssemblerMIPS@{AssemblerMIPS}!AssemblerMIPS@{AssemblerMIPS}}
\index{AssemblerMIPS@{AssemblerMIPS}!AssemblerMIPS@{AssemblerMIPS}}
\paragraph{\setlength{\rightskip}{0pt plus 5cm}AssemblerMIPS::AssemblerMIPS (istream \& {\em \_\-in}, ostream \& {\em \_\-out})}\hfill}
\label{class_assembler_m_i_p_s_bee29b538acc2c25e6a04f3a26363731}


Constuctor. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-in}]The input stream \item[{\em \_\-out}]The input stream \end{description}
\end{Desc}


\subsubsection{Member Function Documentation}
\hypertarget{class_assembler_m_i_p_s_94b9509fd13e8051f40e591327cc0d13}{
\index{AssemblerMIPS@{AssemblerMIPS}!secondPass@{secondPass}}
\index{secondPass@{secondPass}!AssemblerMIPS@{AssemblerMIPS}}
\paragraph{\setlength{\rightskip}{0pt plus 5cm}void AssemblerMIPS::secondPass ()}\hfill}
\label{class_assembler_m_i_p_s_94b9509fd13e8051f40e591327cc0d13}


Second Pass Outputs the MIPS code. 

Each section of the code is fully documented using inline comments. 